<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://jsptags.com/tags/navigation/pager" prefix="pg" %>
<%@ taglib prefix="s" uri="/struts-tags"%>
<html>
<head>
<style type="text/css">
A.nodec { text-decoration: none; }


</style>
</head>
<body>
<h1 class="pagetitle">采购订单</h1>

<pg:pager
	url="purchaseOrder!list.action"
    items="${pager.totalSize}"
    maxPageItems="${pager.pageSize}"
    isOffset="true"
    export="offset,currentPageNumber=pageNumber"
    scope="request">
  <jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
  <table class="bigtable">
  <colgroup>
        <col width="50"></col>
        <col width=80></col>
        <col width=100></col>
        <col width=150></col>
        <col width=80></col>
        <col width=80></col>
        <col></col>
        <col width=80></col>
        <col width=80></col>
  </colgroup>
  <tr><th rowspan="2">ID</th><th rowspan="2">供应商</th><th colspan="4">ALL</th><th rowspan="2">状态</th><th rowspan="2">备注</th><th rowspan="2">--</th></tr>
  <tr><th>物料类别</th><th>物料名称</th><th>单价</th><th>数量</th></tr>
  <s:iterator value="pager.list" var="thePage" status="pl">
  <tr <s:if test="#pl.even">class="tr-even"</s:if>>
  	<td><s:property value="id"/></td>
  	<td><s:property value="supplierName"/></td>
  	<td colspan="4">
  		<table class="smalltable">
  			<s:iterator value="partsList">
  				 <colgroup>
				        <col width=80></col>
				        <col width=80></col>
				        <col width=80></col>
				        <col width=80></col>
				  </colgroup>
  				<tr>
  					<td><s:property value="typeName"/></td>
  					<td><s:property value="name"/></td>
  					<td><s:property value="price"/></td>
  					<td><s:property value="quantity"/></td>
  				</tr>
  			</s:iterator>
  		</table>
  	</td>
  	<td><s:property value="status"/></td>
  	<td><s:property value="remark"/></td>
  	<td>
  	<s:if test="status > 0"><a href="storeRecord!putInStore.action?purchaseOrder.id=${id}">入库</a><br></s:if>
  	 <a href="purchaseOrder!modify.action?purchaseOrder.id=${id}">修改</a>
  	 <a href="purchaseOrder!delete.action?purchaseOrder.id=${id}">删除</a></td>
  </tr>
  </s:iterator>
  </table>
  <jsp:include page="/WEB-INF/jsp/simple.jsp" flush="true"/>
</pg:pager>
</body>
</html>